#ifndef __RTSP_PARSER_H__
#define __RTSP_PARSER_H__

#define HEADER_NUM 44
#define DEFAULT_RTSP_VERSION "RTSP/1.0"

typedef struct request
{
    INT8 *method;            
    INT8 *uri;              
    INT8 *version;            
    INT8 *header[HEADER_NUM];          
    INT8 *content;
}REQUEST;

typedef struct response
{
    INT8 *version;
    INT8 *status_code;
    INT8 *reason;
    INT8 *header[HEADER_NUM];
    INT8 *content;
}RESPONSE;

extern INT32 convert_headser_string_to_num(const INT8 *str);
extern INT32 request_get_params(const INT8 *msg, REQUEST *req);
extern void  request_release_params(REQUEST *req);
extern INT32 response_set_version(const INT8 *version, RESPONSE *res);
extern INT32 response_set_status_code(const INT8 *status_code, RESPONSE *res);
extern INT32 response_set_reason(const INT8 *reason, RESPONSE *res);
extern INT32 response_set_header(const INT8 *header, const INT8 *header_content, RESPONSE *res);
extern INT32 response_set_content(const INT8 *content, RESPONSE *res);
extern INT32 response_assemble_message(INT8 **msg, UINT32 *msg_len, RESPONSE *res);
extern void  response_release_params(RESPONSE *res);
extern void  request_debug(REQUEST *req);


#endif
